package com.jxm.annotation;

import com.jxm.validation.MobileValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;

@Retention(RetentionPolicy.RUNTIME)
@Target({FIELD})
@Constraint(validatedBy = {MobileValidator.class})
public @interface Mobile {
    String message() default "请输入正确的手机号~";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
